<?php defined('_JEXEC') or die('Restricted access');
$doc =& JFactory::getDocument();
$doc->setMetaData( 'generator', 'ODude.com Ecard System FREE 1.4' );
 ?>
<?php JHTML::_('behavior.formvalidation'); ?>
<script language="javascript">
function myValidate(f) {
        if (document.formvalidator.isValid(f)) {
                f.check.value='<?php echo JUtility::getToken(); ?>';//send token
                return true; 
        }
        else {
                alert('<?php echo JText::_('ECARD_ERROR'); ?>');
        }
        return false;
}

Window.onDomReady(function() {
        document.formvalidator.setHandler('birth', function(value) {
                regex=/^\d{4}(-\d{2}){2}$/;
                return regex.test(value);
        })
})

</script>

<style type="text/css">
<!--
.bar {
	color: <?php echo $this->a4 ?>;
	background-color: <?php echo $this->a2 ?>;
	border-top-width: 1px;
	border-top-style: solid;
	border-top-color: <?php echo $this->a3 ?>;

}
.box {
	background-image: url(<?php echo JURI::root() ?>images/stories/ecard/<?php echo $this->cate_bg ?>);
	border: 1px solid <?php echo $this->a2 ?>;
}


.red {
	border: 1px solid red;
}


.errorMessage {
	color: red;
	margin-left: 10px;
	font-size: 0.8em;
}


#card {
	BORDER-RIGHT: #ccc 1px solid;
	PADDING-RIGHT: 3px;
	BORDER-TOP: #ccc 1px solid;
	DISPLAY: inline;
	PADDING-LEFT: 3px;
	BACKGROUND: <?php echo $this->a1 ?>;
	FLOAT: left;
	PADDING-BOTTOM: 3px;
	MARGIN: 1px 1px 1px 1px;
	BORDER-LEFT: #ccc 1px solid;
	PADDING-TOP: 3px;
	BORDER-BOTTOM: #ccc 1px solid;
	LIST-STYLE-TYPE: none;
	TEXT-ALIGN: center
}
#card2 {
	BORDER-RIGHT: #ccc 1px solid;
	BORDER-TOP: #ccc 1px solid;
	BACKGROUND: #f5f5f5;
	MARGIN: 1px;
	BORDER-LEFT: #ccc 1px solid;
	BORDER-BOTTOM: #ccc 1px solid;
	LIST-STYLE-TYPE: none;
	padding: 3px;
}
#card A {
	COLOR: #333;
	TEXT-DECORATION: none
}
#card A:hover {
	COLOR: #0000C0;
}
#tnt_pagination {
	display:block;
	text-align:left;
	height:22px;
	line-height:21px;
	clear:both;
	padding-top:3px;
	font-family:Arial, Helvetica, sans-serif;
	font-size:12px;
	font-weight:normal;
}
#tnt_pagination a:link, #tnt_pagination a:visited {
	padding:7px;
	padding-top:2px;
	padding-bottom:2px;
	border:1px solid #EBEBEB;
	margin-left:3px;
	text-decoration:none;
	background-color:<?php echo $this->a1 ?>;
	color:<?php echo $this->a4 ?>;
	width:22px;
	font-weight:normal;
}
#tnt_pagination a:hover {
	background-color:<?php echo $this->a2 ?>;
	border:1px solid <?php echo $this->a3 ?>;
	color:#0072BC;
}
#tnt_pagination .active_tnt_link {
	padding:7px;
	padding-top:2px;
	padding-bottom:2px;
	border:1px solid <?php echo $this->a3 ?>;
	margin-left:10px;
	text-decoration:none;
	background-color:<?php echo $this->a2 ?>;
	color:<?php echo $this->a4 ?>;
	cursor:default;
}
#tnt_pagination .disabled_tnt_pagination {
	padding:7px;
	padding-top:2px;
	padding-bottom:2px;
	border:1px solid #EBEBEB;
	margin-left:10px;
	text-decoration:none;
	background-color:<?php echo $this->a1 ?>;
	color:#D7D7D7;
	cursor:default;
}

-->
</style>
<style>
table.fancy {
  margin: 1em 1em 1em 0;
  background: <?php echo $this->get( 'a1' ) ?>;
  border-collapse: collapse;
}
table.fancy tr:hover {
   background: <?php echo $this->get( 'a2' ) ?> !important;
}
table.fancy th, table.fancy td {
  border: 1px silver solid;
  padding: 0.2em;
}
table.fancy th {
  background: gainsboro;
  text-align: left;
}
table.fancy caption {
  margin-left: inherit;
  margin-right: inherit;
}

</style>
<?php 

	if($this->cate_banner!="")
	echo "<center><img src=\"images/stories/ecard/".$this->cate_banner."\" alt=\"".$this->cate_name."\"  /></center>";

 $params = &JComponentHelper::getParams( 'com_odudecard' );
 $component = JComponentHelper::getComponent( 'com_odudecard' );
  $params = new JParameter( $component->params );


?>
<div class=box>
  <div class=bar align="center">&nbsp;</div>

 <form id='myForm' action="index.php?option=com_odudecard&controller=odudecardsend" method="post" class="form-validate" onSubmit="return myValidate(this);">
 <table width="98%" border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td width="67%" align="left">
     <span class=bar><?php echo JText::_('ECARD_TYPE_INFO'); ?> </span><div id=card>
        <table width="391" border="0" cellspacing="2" cellpadding="2">
          <tr>
            <td width="213" align="left"><?php echo JText::_('ECARD_YOUR_NAME'); ?>*</td>
            <td width="164">
              <input type="text" name="SN" id="SN" class="required" />
              </td>
            </tr>
          <tr>
            <td align="left"><?php echo JText::_('ECARD_YOUR_EMAIL'); ?>*</td>
            <td><input type="hidden" name="check" value="post"/>

                          

              <input type="text" name="SE" id="SE" class="required validate-email"/>
            </td>
            </tr>
          <tr>
            <td align="left"><?php echo JText::_('ECARD_SUBJECT'); ?>*</td>
            <td><input type="text" name="title" id="title" class="required" /></td>
            </tr>
          </table></div>
      <input name="id" type="hidden" id="id" value="<?php echo JRequest::getVar('id', 0, 'request', 'int');  ?>" />
      <input name="cate" type="hidden" id="cate" value="<?php echo $this->cate;  ?>" />
         </td>
    <td width="33%" align="center"><img src="<?php  echo JURI::base().'images/stories/ecard/'.$this->thumb;  ?>" hspace="2" vspace="2" border="1" /><br />
      <strong>
        <?php echo $this->title;  ?>
      </strong></td>
  </tr>
  <tr>
    <td colspan="2"><span class=bar><?php echo JText::_('ECARD_MESSAGE'); ?></span><br />
 <textarea name="body" id="body" cols="50" rows="8" class="required"></textarea>

   <input name="send" type="hidden" id="send" value="<?php echo $this->send;  ?>" />


      </td>
  </tr>

  <tr>
    <td colspan="2">
    <table border="0" width="10%" class=fancy>
     <tr><th><?php echo JText::_('ECARD_REC'); ?> </th><th><?php echo JText::_('ECARD_REC_EMAIL'); ?></th></tr>

    <span class=bar><?php echo JText::_('ECARD_ENTER_REC_DETAILS'); ?></span><br />



	
<tr>
<td> <input type=text name=name[] id=name[]  /></td>
<td><input type=text name=email[] id=email[] class=email /></td>
</tr>

    </table>
       </td>
    </tr>


 
  <tr>
    <td colspan="2">
      <label>
        <input name="notify" type="checkbox" id="notify" value="Y" checked="checked" />
      </label>
      <?php echo JText::_('ECARD_NOTIFY'); ?></td>
    </tr>
  <tr>
    <td colspan="2"><input type="submit" name="button" id="button" value="<?php echo JText::_('ECARD_SEND_ECARD'); ?>" class="submit"/>
   </td>
    </tr>
  </table>


 </form>

</div>
<BR><a href=http://www.odude.com target=_blank ><img src="components/com_odudecard/images/dot.gif" border=0 align=right></a>
